package test09_26;

import java.io.File;
import java.io.FileFilter;

public class Test {
    public static void main(String[] args) {
        File dir = new File("./src/test09_26");
        if (dir.isDirectory()){
            FileFilter filter = new FileFilter() {
                @Override
                public boolean accept(File file) {
                    String name = file.getName();
                    return name.startsWith("D");
                }
            };
            File[] subs = dir.listFiles(filter);
            for (File sub : subs){
                System.out.println(sub.getName());
            }
        }
    }
}
